package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class JoinRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Send_Apply";

    private int babyID;

    private String role;

    public int getBabyID() {
        return babyID;
    }

    public void setBabyID(int babyID) {
        this.babyID = babyID;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        JoinRequestBody body = new JoinRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setBabyID(getBabyID());
        body.setRole(getRole());
        return body;
    }

    private class JoinRequestBody extends BaseTokenRequestBody {

        @SerializedName("BabyID")
        private int babyID;

        @SerializedName("UserMemberName")
        private String role;

        public int getBabyID() {
            return babyID;
        }

        public void setBabyID(int babyID) {
            this.babyID = babyID;
        }

        public String getRole() {
            return role;
        }

        public void setRole(String role) {
            this.role = role;
        }

        private JoinRequestBody() {
            setSv(BaseRequestConfig.SV_JOIN);
        }
    }

}
